﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContractGroup.aspx.cs" Inherits="SysManage_ContractGroupAndRolesGroup_ContractGroup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>页面合同浏览组管理</title>
    <link href="../../CSS/SubStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Jscript/wyyjs.js"></script>
    <script type="text/javascript" language="javascript">
        function boundvalid() {
            boundsource("txtCGName", "^.+$", "名称不能为空--Not null", "cmdAdd,cmdEdit");
            boundsource("txtCGCode", "^.+$", "编号不能为空--Not null", "cmdAdd,cmdEdit");
        }
    </script>
</head>
<body onload="boundvalid();">
    <form id="form1" runat="server" autocomplete="off">
        <table cellpadding="0" cellspacing="0" class="topTable">
            <tr>
                <td class="topTd">
                    <asp:Label ID="lblLocation" runat="server" Text="当前位置"></asp:Label><img
                        alt="当前位置" src="../../Image/weizhi.gif" />>><asp:Label ID="Label1" runat="server" Text="页面字段角色组管理"></asp:Label><asp:Label
                            ID="Label2" runat="server" Text="<%$ Resources:language, Must1 %>"></asp:Label><font
                                color="#ff0000">*</font><asp:Label ID="Label3" runat="server" Text="<%$ Resources:language, Must2 %>"></asp:Label>
                </td>
            </tr>
        </table>
         <fieldset>
                        <legend><font style="font-size: 12px;">
                            <asp:Label ID="lblLegend1" runat="server" Text="<%$ Resources:language, Legend1 %>"></asp:Label></font></legend>
                        <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;" class="topTdInput">
                                        <tr>
                                            <td colspan="4" style="height:12px;"></td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20%; text-align:right;">
                                                <asp:Label ID="Label5" runat="server" Text="<%$ Resources:hwlan, contractGroupCode %>"></asp:Label></td>
                                            <td style="width: 25%; text-align:left;">
                                                    <asp:TextBox ID="txtCGCode" runat="server" CssClass="txtStyle" MaxLength="20">
                                                    </asp:TextBox></td>
                                            <td style="width: 20%; text-align:right;">
                                                <asp:Label ID="Label4" runat="server" Text="<%$ Resources:hwlan, contractGroupName %>"></asp:Label></td>
                                            <td style="width:25%; text-align:left;">
                                                <asp:TextBox ID="txtCGName" runat="server" CssClass="txtStyle" MaxLength="50"></asp:TextBox></td>
                                            <td style="width: 10%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20%; text-align:right;">
                                                <asp:Label ID="Label8" runat="server" Text="<%$ Resources:hwlan, desc %>"></asp:Label></td>
                                            <td style="width:70%; text-align:left;" colspan="3">
                                                <asp:TextBox ID="txtCGDesc" CssClass="txtStyle" runat="server" MaxLength="300"></asp:TextBox></td>
                                            <td style="width: 10%;"></td>
                                        </tr>
                                        <tr>
                                            <td colspan="4" style="height:12px;"></td>
                                        </tr>
                                    </table>
                        <div class="cmdButtonsDiv">
                                    &nbsp;<asp:Button ID="cmdQuery" runat="server" CssClass="cmdStyle" OnClick="cmdQuery_Click"
                                        Text="<%$ Resources:hwlan, search %>" />
                                    &nbsp;<asp:Button ID="cmdAdd" runat="server" Text="<%$ Resources:hwlan, insert %>"
                                        CssClass="cmdStyle" OnClick="cmdAdd_Click" />
                                    &nbsp;<asp:Button ID="cmdEdit" runat="server" Text="<%$ Resources:hwlan, edit %>"
                                        CssClass="cmdStyle" Enabled="False" OnClick="cmdEdit_Click" />
                                    <input id="cmdClear" class="cmdStyle" type="button" runat="server" value="<%$ Resources:hwlan, reset %>"
                                        onserverclick="cmdClear_ServerClick" />
                    </div>
             </fieldset>
        <fieldset>
            <legend><font style="font-size: 12px;">
                <asp:Label ID="lblLegend2" runat="server" Text="<%$ Resources:language, Legend2 %>"></asp:Label></font></legend>
            <div style="width: 99.9%; overflow-x:auto; overflow-y:hidden;">
                <asp:GridView ID="GrvContractGroup" runat="server" AutoGenerateColumns="False" CssClass="gvStyle"
                    AllowPaging="True" GridLines="None" PageSize="20" OnRowDeleting="GrvContractGroup_RowDeleting"
                    OnRowDataBound="GrvContractGroup_RowDataBound" Width="100%" 
                    OnPageIndexChanging="GrvContractGroup_PageIndexChanging" 
                    OnRowCommand="GrvContractGroup_RowCommand" 
                    onselectedindexchanged="GrvContractGroup_SelectedIndexChanged">
                    <HeaderStyle CssClass="gvHeader" />
                    <RowStyle CssClass="gvRow" />
                    <AlternatingRowStyle CssClass="gvAllRow" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                NO.</HeaderTemplate>
                            <ItemTemplate>
                                <%#GrvContractGroup.PageIndex * GrvContractGroup.PageSize + GrvContractGroup.Rows.Count + 1%>
                            </ItemTemplate>
                            <ItemStyle CssClass="gvItem" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="CGCode" HeaderText="<%$ Resources:hwlan, contractGroupCode %>">
                            <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CGName" HeaderText="<%$ Resources:hwlan, contractGroupName %>">
                            <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CGDesc" HeaderText="<%$ Resources:hwlan, desc %>">
                            <ItemStyle CssClass="gvItem" HorizontalAlign="Left" />
                        </asp:BoundField>
                            <asp:CommandField HeaderText="<%$ Resources:language, Edit %>" ShowSelectButton="true"
                                SelectText="&lt;img border=0 alt=&quot;Edit&quot; src=../../Image/edit.gif&gt;">
                                <ItemStyle CssClass="gvItem" />
                            </asp:CommandField>
                        <%--<asp:CommandField ShowEditButton="True" EditText="&lt;img border=0 alt=&quot;Edit&quot; src=../../Image/edit.gif&gt;"
                            HeaderText="<%$ Resources:language, Edit %>">
                            <ItemStyle CssClass="gvItem" />
                        </asp:CommandField>--%>
                        <asp:CommandField ShowDeleteButton="True" DeleteText="&lt;img border=0 alt=&quot;Delete&quot; src=../../Image/del.gif&gt;"
                            HeaderText="<%$ Resources:language, Delete %>">
                            <ItemStyle CssClass="gvItem" />
                        </asp:CommandField>
                    </Columns>
                    <PagerTemplate>
                        <table style="width: 100%;">
                            <tr>
                                <td align="left">
                                    <asp:Label ID="lblTotal1" runat="server" Text="<%$ Resources:UserSqlPage, Total1 %>"></asp:Label><asp:Label
                                        ID="lblCount" runat="server"></asp:Label><asp:Label ID="Total2" runat="server" Text="<%$ Resources:UserSqlPage, Total2 %>"></asp:Label>,<asp:Label
                                            ID="Label5" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage1 %>"></asp:Label><asp:Label
                                                ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' /><asp:Label
                                                    ID="Label11" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage2 %>"></asp:Label>,<asp:Label
                                                        ID="Label3" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage1 %>"></asp:Label><asp:Label
                                                            ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' /><asp:Label
                                                                ID="Label12" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage2 %>"></asp:Label>
                                    <% //首页/上一页 %>
                                    <% if (this.GrvContractGroup.PageIndex <= 0)
                                       { %>
                                    <asp:LinkButton ID="LinkButton1" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                    <asp:LinkButton ID="LinkButton2" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                    <% }
                                       else
                                       { %>
                                    <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandArgument="First"
                                        CommandName="Page" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                    <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument="Prev"
                                        CommandName="Page" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                    <% } %>
                                    <% //下一页/尾页 %>
                                    <% if (this.GrvContractGroup.PageIndex >= GrvContractGroup.PageCount - 1)
                                       { %>
                                    <asp:LinkButton ID="LinkButton5" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                    <asp:LinkButton ID="LinkButton6" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                    <% }
                                       else
                                       { %>
                                    <asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False" CommandArgument="Next"
                                        CommandName="Page" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                    <asp:LinkButton ID="LinkButton8" runat="server" CausesValidation="False" CommandArgument="Last"
                                        CommandName="Page" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                    <% } %>
                                    <asp:TextBox ID="txtNewPageIndex" runat="server" Text="<%# ((GridView)Container.Parent.Parent).PageIndex + 1%>"
                                        Width="20px"></asp:TextBox>
                                    <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                        CommandName="NewPage" Text="<%$ Resources:UserSqlPage, PageGo %>"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                </asp:GridView>
            </div>
        </fieldset>
        <asp:HiddenField ID="HidQueryFlag" runat="server" Value="0" />
    </form>
</body>
</html>
